import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-warehousesendrecive-manage',
  templateUrl: './warehousesendrecive-manage.component.html',
  styleUrls: ['./warehousesendrecive-manage.component.scss']
})
export class WarehousesendreciveManageComponent implements OnInit {
  searchCode:string="";
  searchName:string="";
  searchKf:string="";
  searchKq:string="";
  // startValue:string="";
  // endValue:string="";
  // listOfData=[];
  listOfData = [
    {
      kfkq: '1-1',
      wlbm: '123',
      wlName: '234',
      pc: '5656',
      qcchl: '5656',
      cksl: '5656',
      rksl: '5656',
      qmkcl: '5656',
    }
  ]
  
  handleSearch(){}

  //#region 
  
  startValue: Date | null = null;
  endValue: Date | null = null;
  endOpen = false;

  constructor() { }
  departValue: string = '';//部门名称
  ngOnInit() {
  }
  disabledStartDate = (startValue: Date): boolean => {
    if (!startValue || !this.endValue) {
      return false;
    }
    return startValue.getTime() > this.endValue.getTime();
  };

  disabledEndDate = (endValue: Date): boolean => {
    if (!endValue || !this.startValue) {
      return false;
    }
    return endValue.getTime() <= this.startValue.getTime();
  };
  onStartChange(date: Date): void {
    this.startValue = date;
  }

  onEndChange(date: Date): void {
    this.endValue = date;
  }
  handleStartOpenChange(open: boolean): void {
    if (!open) {
      this.endOpen = true;
    }
    //  console.log('handleStartOpenChange', open, this.endOpen);
  }

  handleEndOpenChange(open: boolean): void {
    //console.log(open);
    this.endOpen = open;
  }
  //#endregion
}
